package ly.gupao.edu.socket;

import com.google.gson.JsonObject;
import org.springframework.util.StopWatch;

import java.util.stream.IntStream;

/**
 * @author: liyang
 * @date：2018/10/29 0029
 * describe：
 */
public class Test {

    public static void main(String[] args) {


//        StopWatch stopWatch = new StopWatch();
//        stopWatch.start("for 100");
//        for (int i = 0; i < 100; i++) {
//            String jsonObject = HttpConnectionPoolUtil.post("https://www.baidu.com", null);
////            System.out.println(jsonObject);
//        }
//        stopWatch.stop();
//        System.out.println(stopWatch.prettyPrint());



//        StopWatch stopWatch1 = new StopWatch();
//        stopWatch1.start("stream run thread!");
//        IntStream.rangeClosed(1, 10000).forEach( e -> {
//            Runnable runnable = () -> {
//                String jsonObject = HttpConnectionPoolUtil.post("https://www.baidu.com", null);
////                System.out.println(jsonObject);
//            };
//            runnable.run();
//        });
//        stopWatch1.stop();
//        System.out.println(stopWatch1.prettyPrint());

    }

}
